home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Audio dcmds
/
Audio CD dcmds.sit
/
Audio CD dcmds.π
/
Think Put Lib source
/
PutUDecTo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-31
|
466b
|
26 lines
extern short __putMark;
void PutChar(char c);
void PutText(const char* s, int len );
void __DecToText (unsigned long dec, char* str );
void PutSpacesTo(int endpos);
void PutUDecTo(unsigned long i, int endpos)
{
int start, n = 0;
char* str = "0000000000";
__DecToText (i, str );
while ( str[n] == '0' && n<9 )
n++;
start = endpos - (10-n);
if ( start >= __putMark )
PutSpacesTo( start-1 );
PutChar( '#' );
PutText( &str[n], 10-n );
}